<div id="summary">
<table class="dataTable">
	<thead>
	<tr>
		<td class="columnLabel">
			<a class="sortButton" onclick="new Ajax.Updater('summary', '/stats/summary_sort?sort_name=name', {asynchronous:true, evalScripts:true, onFailure:function(request){alert('Oops, try again.');}}); return false;" href="#">Weapon</a>
		</td>
		<td class="columnLabel">
			<a class="sortButton" onclick="new Ajax.Updater('summary', '/stats/summary_sort?sort_name=games', {asynchronous:true, evalScripts:true, onFailure:function(request){alert('Oops, try again.');}}); return false;" href="#">Kills With</a>
		</td>
		<td class="columnLabel">
			<a class="sortButton" onclick="new Ajax.Updater('summary', '/stats/summary_sort?sort_name=kills', {asynchronous:true, evalScripts:true, onFailure:function(request){alert('Oops, try again.');}}); return false;" href="#">Killed By</a>
		</td>
		<td class="columnLabel">
			<a class="sortButton" onclick="new Ajax.Updater('summary', '/stats/summary_sort?sort_name=assists', {asynchronous:true, evalScripts:true, onFailure:function(request){alert('Oops, try again.');}}); return false;" href="#">Assists</a>
		</td>
		<td class="columnLabel">
			<a class="sortButton" onclick="new Ajax.Updater('summary', '/stats/summary_sort?sort_name=deaths', {asynchronous:true, evalScripts:true, onFailure:function(request){alert('Oops, try again.');}}); return false;" href="#">Deaths</a>
		</td>
		<td class="columnLabel">
			<a class="sortButton" onclick="new Ajax.Updater('summary', '/stats/summary_sort?sort_name=kd_ratio', {asynchronous:true, evalScripts:true, onFailure:function(request){alert('Oops, try again.');}}); return false;" href="#">K/D</a>
		</td>
		<td class="columnLabel">
			<a class="sortButton" onclick="new Ajax.Updater('summary', '/stats/summary_sort?sort_name=kill_per_game', {asynchronous:true, evalScripts:true, onFailure:function(request){alert('Oops, try again.');}}); return false;" href="#">Kill/Game</a>
		</td>
		<td class="columnLabel">
			<a class="sortButton" onclick="new Ajax.Updater('summary', '/stats/summary_sort?sort_name=assist_per_game', {asynchronous:true, evalScripts:true, onFailure:function(request){alert('Oops, try again.');}}); return false;" href="#">Assist/Game</a>
		</td>
		<td class="columnLabel">
			<a class="sortButton" onclick="new Ajax.Updater('summary', '/stats/summary_sort?sort_name=death_per_game', {asynchronous:true, evalScripts:true, onFailure:function(request){alert('Oops, try again.');}}); return false;" href="#">Death/Game</a>
		</td>
	</tr>
	</thead>
	
	<% index = 0 %>
	<% @players.each do |player| %>
	<tr <%= (((index % 2) == 1) ? "class='rowA'" : "class='rowB'") %>>
		<td>
			<%= player[:name] %>
		</td>
		<td>
			<%= player[:games] %>
		</td>
		<td>
			<%= player[:kills] %>
		</td>
		<td>
			<%= player[:assists] %>
		</td>
		<td>
			<%= player[:deaths] %>
		</td>
		<td>
			<%= player[:kd_ratio] %>
		</td>
		<td>
			<%= player[:kill_per_game] %>
		</td>
		<td>
			<%= player[:assist_per_game] %>
		</td>
		<td>
			<%= player[:death_per_game] %>
		</td>
	</tr>
	<% index = index + 1 %>
	<% end -%>
</table>
</div>